package com.itcate.Damo1;

public class test {
    public static void main(String[] args) {
        fu f = new zi();
        System.out.println(f.a);
        f.eat();
    }
}
/*
成员变量：编译看左边，运行看左边
成员方法：编译看左边，运行看右边
*/

class fu{
     int a = 10;

    public void eat () {
        System.out.println("草泥马");
    }
}
class zi extends fu{
    int a = 20;

    @Override
    public void eat() {
        System.out.println("曹尼玛");
    }
}
